package com.fr.data.util;

import com.fr.base.FComparator;

public abstract class AbstractComparator
  implements FComparator
{
  private boolean negate = false;

  public void setNegate(boolean paramBoolean)
  {
    this.negate = paramBoolean;
  }

  public boolean isNegate()
  {
    return this.negate;
  }

  public int compare(Object paramObject1, Object paramObject2)
  {
    return ((isNegate()) ? -1 * innerCompare(paramObject1, paramObject2) : innerCompare(paramObject1, paramObject2));
  }

  protected abstract int innerCompare(Object paramObject1, Object paramObject2);
}